<?php
class Dashboard extends CI_Controller{

	
	public function __construct(){	
		parent::__construct();
		
		$preUrl = $_SERVER['PATH_INFO'];
		$this->session->set_userdata('preUrl',$preUrl);
		if($this->User_model->is_logged_in() != TRUE){
			redirect('login');
		}
		
		if($this->session->userdata('controller') != 'dashboard'){
			$this->session->set_userdata('controller','dashboard');
		}
	}
	
	public function index(){

		$this->template->write_view('content','dashboard/index',null,TRUE);
		$this->template->load();
		//$this->load->view('dashboard/index');
	}
}